package com.woniuxy.school.dietary.store.client;

import com.woniuxy.commons.core.model.Result;
import com.woniuxy.school.dietary.store.model.dto.FindStoreByIdDto;
import com.woniuxy.school.dietary.store.model.dto.FindStoreDto;
import com.woniuxy.school.dietary.store.model.from.FindDietTimeFrom;
import com.woniuxy.school.dietary.store.model.from.FindStoreFrom;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name ="dietary-store",path = "/store")
public interface StoreClient {
    @GetMapping("/storeInfo/findStore")
    @ApiOperation(value = "查询商家信息")
    public Result<FindStoreDto> findStore(@SpringQueryMap FindStoreFrom from);

    @GetMapping("/storeInfo/findStoreById/{id}")
    @ApiOperation(value = "有条件查询商家信息")
    public Result<FindStoreByIdDto> findStoreById(@PathVariable Long id);

    @PostMapping("/dietTimeConfig/findDietTime")
    public Result<Boolean> findDietTime(@RequestBody FindDietTimeFrom from);

}
